Skip to content

[MKT-778]fix/handle unsupported file types gracefully for metadata remover#1825

Merged
jaaaaavier merged 3 commits intomainfrom
improves/sonar-quality
Mar 9, 2026
Merged

[MKT-778]fix/handle unsupported file types gracefully for metadata remover#1825
jaaaaavier merged 3 commits intomainfrom
improves/sonar-quality

Conversation

@jaaaaavier
Copy link
Contributor

Problem

Two bugs were present in the metadata remover tool:

  1. useState was incorrectly destructured, causing setProcessResult to be typed as null instead of a setter function, throwing a runtime error on call.
  2. Uploading an unsupported file type crash silently into a generic error modal with no meaningful feedback to the user.

Changes

  • Exported SUPPORTED_TYPES so it can be consumed by the UI layer.
  • Fixed useState destructuring: setProcessResult into processResult, setProcessResult.
  • Added isUnsupportedType state that is set in handleFiles
  • Added a dedicated UI block that displays a clear File type not supported message with a retry button when an unsupported file is selected.
  • Reset isUnsupportedType in [handleRestartProcess]

@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment Mar 9, 2026 1:01pm

@jaaaaavier jaaaaavier self-assigned this Mar 9, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label Mar 9, 2026
@jaaaaavier jaaaaavier requested a review from xabg2 March 9, 2026 12:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@jaaaaavier jaaaaavier merged commit f0be3a6 into main Mar 9, 2026
9 of 10 checks passed
@jaaaaavier jaaaaavier deleted the improves/sonar-quality branch March 9, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants